<?php
Yii::import('Gallery.components.GalleryHelper');
$script="
function mycarousel_initCallback(carousel)
        {
            //Disable autoscrolling if the user clicks the prev or next button.
            carousel.buttonNext.bind('click', function() {
                carousel.startAuto(0);
            });

            carousel.buttonPrev.bind('click', function() {
                carousel.startAuto(0);
            });

            //Pause autoscrolling if the user moves with the cursor over the clip.
            carousel.clip.hover(function() {
                carousel.stopAuto();
            }, function() {
                carousel.startAuto();
            });
        };

jQuery(document).ready(function() {
            jQuery('#mycarousel').jcarousel({
                vertical: true,
                auto: 2,
                wrap: 'last',
                initCallback: mycarousel_initCallback
            });
        });

$(window).load(function() {
    $('#slider').nivoSlider();
});";
//cs()->registerScript('#'.__FILE__,$script,CClientScript::POS_HEAD);
?>
<div id="topbaner">
    <div class="slider-wrapper theme-default">
        <div id="slider" class="nivoSlider">
            <?php
            $photos=GalleryHelper::getListPhoto($this->galleryId,false);
            if(count($photos)){
                foreach($photos as $photo){
                    echo CHtml::image($photo->path,$photo->name,array('class'=>$photo->description))."\n";
                }
            }
            ?>
            <!--<img src="<?php /*echo themeUrl()*/?>/images/slider1.jpg" alt="" />
            <img src="<?php /*echo themeUrl()*/?>/images/slider2.jpg" alt="" />
            <img src="<?php /*echo themeUrl()*/?>/images/slider3.jpg" alt="" />
            <img src="<?php /*echo themeUrl()*/?>/images/slider4.jpg" alt="" />-->
        </div>
    </div>
</div>
